feat(1password-plugin): add useCliWithServiceAccount for memory-constrained headless environments#692
Conversation
…ss CLI auth Agent-Logs-Url: https://github.com/dmno-dev/varlock/sessions/4fe1ccab-22cb-4d56-b5e5-b53bd2c93606 Co-authored-by: theoephraim <1158956+theoephraim@users.noreply.github.com>
useCliWithServiceAccount for memory-constrained headless environments
|
@copilot - switch to |
…nstead of global flag Agent-Logs-Url: https://github.com/dmno-dev/varlock/sessions/a9f1a7e8-25c9-4f94-a10b-1dd124697e25 Co-authored-by: theoephraim <1158956+theoephraim@users.noreply.github.com>
Done in f0d6d47:
|
|
@copilot - while unlikely, in theory, the user could have different settings for different instances. Can we adjust so there are no global side effects, and batching only combines per instance? |
…or full per-instance isolation Agent-Logs-Url: https://github.com/dmno-dev/varlock/sessions/9b68f206-e3be-4973-b9fb-5a5a5c5ddb90 Co-authored-by: theoephraim <1158956+theoephraim@users.noreply.github.com>
…or full per-instance isolation Agent-Logs-Url: https://github.com/dmno-dev/varlock/sessions/9b68f206-e3be-4973-b9fb-5a5a5c5ddb90 Co-authored-by: theoephraim <1158956+theoephraim@users.noreply.github.com>
Done in 2d0c40d. All CLI batching state and logic has been moved into
Each instance has its own independent batch queue, account, token, and auth mutex — no global side effects at all. |
|
The changes in this PR will be included in the next version bump.
|
|
@copilot - the issue is that if using the cli (without a service account token) then you can only be logged in as one account, so the auth mutex should be global. However if you are using service accounts with the CLI, then things must be kept separate. |
…nstance for service account CLI path Agent-Logs-Url: https://github.com/dmno-dev/varlock/sessions/49bf1429-b718-4d95-aef4-53016650f893 Co-authored-by: theoephraim <1158956+theoephraim@users.noreply.github.com>
Done in d9ad1b3. The auth mutex and batch are now split by auth mode:
|
|
@copilot - add this info to the docs website too |
Agent-Logs-Url: https://github.com/dmno-dev/varlock/sessions/14590b2e-4951-4db6-ae62-d4027c0a5c74 Co-authored-by: theoephraim <1158956+theoephraim@users.noreply.github.com>
Done in ba9aae0. Added a "CLI-based service account auth (memory-constrained environments)" subsection to the docs website page, covering the use case, requirements, and a diff code example. Also added |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
varlock-website | ba9aae0 | Commit Preview URL Branch Preview URL |
May 05 2026, 08:58 PM |
|
@copilot fix TS errors |
Agent-Logs-Url: https://github.com/dmno-dev/varlock/sessions/67e287d0-1be4-45cc-86ad-3de9827cf156 Co-authored-by: theoephraim <1158956+theoephraim@users.noreply.github.com>
Fixed in 8d84e40. Two changes:
Build confirms all 24 tasks pass with no TS errors. |
commit: |
…ive tests - Redact token and connectToken in setAuth debug output (was logging plaintext) - Improve debug labels to distinguish auth methods (SDK vs service account CLI vs app auth) - Add 28 tests covering all resolution paths: service account CLI, app auth CLI, SDK, environments, data types, schema errors, and batch error retry logic


minor-isolatedtominorallowAppAuth(desktop app): module-level shared state (same localoplogin context)useCliWithServiceAccount: per-instance state (each token is an independent auth context)cli-helper.tsremains stateless utilities only1password.mdx): added "CLI-based service account auth" subsection anduseCliWithServiceAccountparam to@initOp()referencepackages/utils/src/defer.ts: typed the innernew Promise<T>(...)and updatedresolvesignature to(value: T | PromiseLike<T>) => voidsodeferred.promiseis correctly typed asPromise<T>packages/plugins/1password/src/plugin.tsline 620: changedcreateDeferredPromise()→createDeferredPromise<string>()to fix inferred return type ofreadItem